home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assembly / kcx25asc.lha / KCX / KCXLib.Asm < prev    next >
Encoding:
Assembly Source File  |  1993-06-21  |  38.3 KB  |  1,293 lines

  1.         NOLIST
  2. *AUTO:        smake KCX
  3.  
  4.         opt o+,ow-,ow6+,NODEBUG,NOLINE
  5.  
  6. ;* $Revision Header built automatically *************** (do not edit) ************
  7. ;*
  8. ;* © Copyright by GuntherSoft
  9. ;*
  10. ;* File             : KCXLib.Asm
  11. ;* Created on       : Saturday, 03-Oct-92 18:26:03
  12. ;* Created by       : Kai Iske
  13. ;* Current revision : V2.5
  14. ;*
  15. ;*
  16. ;* Purpose
  17. ;* -------
  18. ;*     Shared library for support functions for both, KCommodity
  19. ;*     itself and the prefs program
  20. ;*
  21. ;* Revision V2.5
  22. ;* --------------
  23. ;*     --- Initial release ---
  24. ;*
  25. ;*********************************************************************************
  26.  
  27.  
  28.         INCLUDE    KCXBase.i
  29.         INCLUDE    Misc/MyMacros.i
  30.         INCLUDE    KCX.i
  31.  
  32.  
  33. **********************************************************************
  34. *         Local parameters for font-sensitive window open up         *
  35. **********************************************************************
  36.         CARGS    #-(4+4+2+2+2+2),OffY.W,OffX.W,FontY.W,FontX.W,FontPtr.L
  37.  
  38.  
  39.         SECTION    LibraryBase,CODE
  40.  
  41.  
  42. **********************************************************************
  43. *                           Not startable                            *
  44. **********************************************************************
  45. Start        moveq    #-1,d0
  46.         rts
  47.  
  48.  
  49. LIBPRI        EQU    0
  50.  
  51.  
  52. **********************************************************************
  53. *                         Romtag definition                          *
  54. **********************************************************************
  55. RomTag        dc.w    RTC_MATCHWORD
  56.         dc.l    RomTag
  57.         dc.l    EndOfLibrary
  58.         dc.b    RTF_AUTOINIT
  59.         dc.b    VERNUM
  60.         dc.b    NT_LIBRARY
  61.         dc.b    LIBPRI
  62.         dc.l    LibName
  63.         dc.l    IDString
  64.         dc.l    InitTable
  65.  
  66. LibName        KCXNAME
  67. IDString    dc.b    "kcx "
  68.         REVISION
  69.         dc.b    " ("
  70.         REVDATE
  71.         dc.b    ")",13,10,0
  72. DosName        dc.b    "dos.library",0
  73. IntName        dc.b    "intuition.library",0
  74. GadName        dc.b    "gadtools.library",0
  75. LayersName    dc.b    "layers.library",0
  76. LocaleName    dc.b    "locale.library",0
  77.         EVEN
  78.  
  79.  
  80.  
  81.  
  82. **********************************************************************
  83. *            Table of items to be used for initialization            *
  84. **********************************************************************
  85. InitTable    dc.l    KCXBASE_SIZEOF
  86.         dc.l    FuncTable
  87.         dc.l    DataTable
  88.         dc.l    InitRoutine
  89.  
  90.  
  91.  
  92. **********************************************************************
  93. *                 Jump table for library`s functions                 *
  94. **********************************************************************
  95. FuncTable    dc.l    Open
  96.         dc.l    Close
  97.         dc.l    Expunge
  98.         dc.l    Null
  99.  
  100.         dc.l    BusyWindow
  101.         dc.l    UnbusyWindow
  102.         dc.l    GetGadgetPtr
  103.         dc.l    SetCheckBox
  104.         dc.l    SetMXGad
  105.         dc.l    SetCycleGad
  106.         dc.l    SetStringGad
  107.         dc.l    SetIntegerGad
  108.         dc.l    SetSliderGad
  109.         dc.l    SetTextGad
  110.         dc.l    SetPaletteGad
  111.         dc.l    SetListViewGad
  112.         dc.l    SetListViewLst
  113.         dc.l    SetNumberGad
  114.         dc.l    GhostGadget
  115.         dc.l    ActStringGad
  116.         dc.l    ComputeFont
  117.         dc.l    ComputeX
  118.         dc.l    ComputeY
  119.         dc.l    ComPut
  120.         dc.l    StrEditFunc
  121.         dc.l    FindWindow
  122.         dc.l    FreeWindows
  123.         dc.l    DisplayError
  124.         dc.l    -1
  125.  
  126.  
  127.  
  128. **********************************************************************
  129. *                  Initializaton table for library                   *
  130. **********************************************************************
  131. DataTable    INITBYTE    LN_TYPE,NT_LIBRARY
  132.         INITLONG    LN_NAME,LibName
  133.         INITBYTE    LIB_FLAGS,LIBF_SUMUSED|LIBF_CHANGED
  134.         INITWORD    LIB_VERSION,VERNUM
  135.         INITWORD    LIB_REVISION,REVNUM
  136.         INITLONG    LIB_IDSTRING,IDString
  137.         dc.l    0
  138.  
  139.  
  140.  
  141.  
  142. **********************************************************************
  143. *     Main init routine, when library is first loaded to memory      *
  144. **********************************************************************
  145. InitRoutine    movem.l    LibRegs,-(sp)
  146.  
  147.         move.l    d0,a4
  148.         move.l    a6,kb_SysBase(a4)
  149.         move.l    a0,kb_SegList(a4)
  150.  
  151.         lea    DosName(pc),a1
  152.         moveq    #37,d0
  153.         DOLIB    OpenLibrary
  154.         move.l    d0,kb_DosBase(a4)
  155.         bne.s    .GotDOS
  156.         ALERT    AG_OpenLib|AO_DOSLib
  157.         bra    .Error
  158. .GotDOS        lea    IntName(pc),a1
  159.         moveq    #37,d0
  160.         DOLIB    OpenLibrary
  161.         move.l    d0,kb_IntBase(a4)
  162.         bne.s    .GotINT
  163.         ALERT    AG_OpenLib|AO_Intuition
  164.         bra    .Error
  165. .GotINT        lea    GadName(pc),a1
  166.         moveq    #37,d0
  167.         DOLIB    OpenLibrary
  168.         move.l    d0,kb_GadBase(a4)
  169.         bne.s    .GotGAD
  170.         ALERT    AG_OpenLib|AO_GadTools
  171.         bra.s    .Error
  172. .GotGAD        lea    LayersName(pc),a1
  173.         moveq    #37,d0
  174.         DOLIB    OpenLibrary
  175.         move.l    d0,kb_LayersBase(a4)
  176.         bne.s    .GotLay
  177.         ALERT    AG_OpenLib|AO_LayersLib
  178.         bra.s    .Error
  179. .GotLay        lea    LocaleName(pc),a1
  180.         moveq    #38,d0
  181.         DOLIB    OpenLibrary
  182.         move.l    d0,kb_LocaleBase(a4)
  183.         tst.l    d0
  184.         beq.s    .End
  185.         move.l    d0,a6
  186.         sub.l    a0,a0
  187.         lea    CatalogName(pc),a1
  188.         sub.l    a2,a2
  189.         DOLIB    OpenCatalogA
  190.         move.l    d0,kb_Catalog(a4)
  191.         move.l    kb_SysBase(a4),a6
  192. .End        move.l    a4,d0
  193.         movem.l    (sp)+,LibRegs
  194.         rts
  195. .Error        moveq    #0,d0
  196.         movem.l    (sp)+,LibRegs
  197.         rts
  198. CatalogName    dc.b    "kcxlib.catalog",0
  199.         EVEN
  200.  
  201.  
  202.  
  203.  
  204.  
  205. **********************************************************************
  206. *          This is the routine called on every OpenLibrary           *
  207. **********************************************************************
  208. Open        addq.w    #1,LIB_OPENCNT(a6)
  209.         bclr    #LIBB_DELEXP,kb_Flags(a6)
  210.         move.l    a6,d0
  211.         rts
  212.  
  213.  
  214.  
  215.  
  216. **********************************************************************
  217. *                Close down one access to the library                *
  218. **********************************************************************
  219. Close        moveq    #0,d0
  220.         subq.w    #1,LIB_OPENCNT(a6)
  221.         bne.s    .GoOn
  222.         btst    #LIBB_DELEXP,kb_Flags(a6)
  223.         beq.s    .GoOn
  224.         bsr.s    Expunge
  225. .GoOn        rts
  226.  
  227.  
  228.  
  229. **********************************************************************
  230. *                           Remove ourself                           *
  231. **********************************************************************
  232. Expunge        movem.l    d1-d7/a0-a6,-(sp)
  233.         move.l    a6,a4
  234.         move.l    kb_SysBase(a4),a6
  235.         tst.w    LIB_OPENCNT(a4)
  236.         beq.s    .GoOn
  237.         bset    #LIBB_DELEXP,kb_Flags(a4)
  238.         moveq    #0,d0
  239.         bra.s    .End
  240. .GoOn        move.l    kb_SegList(a4),d2
  241.         move.l    a4,a1
  242.         DOLIB    Remove
  243.  
  244.         move.l    kb_DosBase(a4),a1
  245.         DOLIB    CloseLibrary
  246.         move.l    kb_IntBase(a4),a1
  247.         DOLIB    CloseLibrary
  248.         move.l    kb_GadBase(a4),a1
  249.         DOLIB    CloseLibrary
  250.         move.l    kb_LayersBase(a4),a1
  251.         DOLIB    CloseLibrary
  252.         tst.l    kb_LocaleBase(a4)
  253.         beq.s    .NoLoc
  254.         move.l    kb_Catalog(a4),a0
  255.         move.l    a6,-(sp)
  256.         move.l    kb_LocaleBase(a4),a6
  257.         DOLIB    CloseCatalog
  258.         move.l    (sp)+,a6
  259.         move.l    kb_LocaleBase(a4),a1
  260.         DOLIB    CloseLibrary
  261. .NoLoc        moveq    #0,d0
  262.         move.l    a4,a1
  263.         move.w    LIB_NEGSIZE(a4),d0
  264.         sub.l    d0,a1
  265.         add.w    LIB_POSSIZE(a4),d0
  266.         DOLIB    FreeMem
  267.         move.l    d2,d0
  268. .End        movem.l    (sp)+,d1-d7/a0-a6
  269.         rts
  270.  
  271.  
  272. **********************************************************************
  273. *                            Just a dummy                            *
  274. **********************************************************************
  275. Null        moveq    #0,d0
  276.         rts
  277.  
  278.  
  279.  
  280.  
  281. **********************************************************************
  282. *                      Font-sensitive routines                       *
  283. **********************************************************************
  284. ComputeX    move.l    d1,-(sp)
  285.         move.w    FontX(a5),d1
  286.         bra.s    ComputeIt
  287. ComputeY    move.l    d1,-(sp)
  288.         move.w    FontY(a5),d1
  289. ComputeIt    mulu    d1,d0
  290.         addq.w    #4,d0
  291.         divu    #8,d0
  292.         move.l    (sp)+,d1
  293.         rts
  294. ComputeFont    move.l    FontPtr(a5),a0
  295.         move.l    -4(a5),a1
  296.         lea.l    sc_RastPort(a1),a1
  297.         move.l    rp_Font(a1),a1
  298.         move.l    LN_NAME(a1),ta_Name(a0)
  299.         move.w    tf_YSize(a1),ta_YSize(a0)
  300.         move.b    #FS_NORMAL,ta_Style(a0)
  301.         move.b    tf_Flags(a1),ta_Flags(a0)
  302.         move.w    tf_XSize(a1),FontX(a5)
  303.         addq.w    #1,FontX(a5)
  304.         move.w    tf_YSize(a1),FontY(a5)
  305.         move.l    -4(a5),a0
  306.         moveq    #0,d0
  307.         move.b    sc_WBorLeft(a0),d0
  308.         move.w    d0,OffX(a5)
  309.         move.l    sc_Font(a0),a1
  310.         move.w    ta_YSize(a1),d0
  311.         addq.w    #1,d0
  312.         moveq    #0,d1
  313.         move.b    sc_WBorTop(a0),d1
  314.         add.w    d1,d0
  315.         move.w    d0,OffY(a5)
  316.         tst.w    d2
  317.         beq.s    CompDone
  318.         tst.w    d3
  319.         beq.s    CompDone
  320.         move.w    d2,d0
  321.         bsr    ComputeX
  322.         add.w    OffX(a5),d0
  323.         moveq    #0,d1
  324.         move.b    sc_WBorRight(a0),d1
  325.         add.w    d1,d0
  326.         cmp.w    sc_Width(a0),d0
  327.         bhi.s    UseTopaz
  328.         move.w    d3,d0
  329.         bsr    ComputeY
  330.         add.w    OffY(a5),d0
  331.         moveq    #0,d1
  332.         move.b    sc_WBorBottom(a0),d1
  333.         add.w    d1,d0
  334.         cmp.w    sc_Height(a0),d0
  335.         bhi.s    UseTopaz
  336. CompDone    rts
  337. UseTopaz    move.l    FontPtr(a5),a0
  338.         lea    FontName(pc),a1
  339.         move.l    a1,ta_Name(a0)
  340.         moveq    #8,d0
  341.         move.w    d0,ta_YSize(a0)
  342.         move.b    #FS_NORMAL,ta_Style(a0)
  343.         move.b    #FPF_ROMFONT,ta_Flags(a0)
  344.         move.w    d0,FontY(a5)
  345.         move.w    d0,FontX(a5)
  346.         rts
  347.  
  348.  
  349. **********************************************************************
  350. *         Set busy for a window and disable all it`s gadgets         *
  351. * A0 = Pointer to window                                             *
  352. **********************************************************************
  353. BusyWindow    movem.l    RegsAll,-(sp)
  354.         move.l    a0,d0
  355.         beq.s    .EndBusy
  356.         move.l    a0,a3
  357.         clr.l    wd_UserData(a3)
  358.         move.l    #rq_SIZEOF,d0
  359.         move.l    #MEMF_CLEAR|MEMF_PUBLIC,d1
  360.         LIBLIB    AllocVec,kb_SysBase
  361.         tst.l    d0
  362.         beq.s    .EndBusy
  363.         move.l    d0,a0                ; Open Requester
  364.         move.l    a3,a1
  365.         move.l    d0,wd_UserData(a1)        ; Store pointer to structure
  366.         LIBLIB    Request,kb_IntBase
  367.         move.l    a3,a0
  368.         lea    BusyPtr,a1
  369.         moveq    #16,d0
  370.         moveq    #16,d1
  371.         moveq    #-6,d2
  372.         moveq    #0,d3
  373.         LIBLIB    SetPointer,kb_IntBase
  374. .EndBusy    movem.l    (sp)+,RegsAll
  375.         rts
  376.  
  377.  
  378.  
  379.  
  380.  
  381. **********************************************************************
  382. *          Un-Busy a window and reenable all gadgets again           *
  383. * A0 = Pointer to window to be re-enabled                            *
  384. **********************************************************************
  385. UnbusyWindow    movem.l    RegsAll,-(sp)
  386.         move.l    a0,d0
  387.         beq.s    .EndBusy
  388.         move.l    a0,a3                ; Clear pointer
  389.         move.l    a0,a1
  390.         move.l    wd_UserData(a0),a0
  391.         LIBLIB    EndRequest,kb_IntBase
  392.         move.l    wd_UserData(a3),a1
  393.         LIBLIB    FreeVec,kb_SysBase
  394.         move.l    a3,a0
  395.         LIBLIB    ClearPointer,kb_IntBase
  396. .EndBusy    movem.l    (sp)+,RegsAll
  397.         rts
  398.  
  399.  
  400.  
  401.  
  402. **********************************************************************
  403. *                 Set a checkbox to specified value                  *
  404. * D0 = Mode                                                          *
  405. * D1 = Number of gadget                                              *
  406. * A0 = Address of GadgetList                                         *
  407. * A1 = Address of window                                             *
  408. **********************************************************************
  409. SetCheckBox    movem.l    RegsAll,-(sp)
  410.         move.l    a1,d2
  411.         beq.s    .End
  412.         link    a5,#-12
  413.         lea    -12(a5),a3
  414.         move.l    #GTCB_Checked,(a3)
  415.         and.l    #$000000ff,d0
  416.         move.l    d0,4(a3)            ; Set tag state
  417.         move.l    #TAG_DONE,8(a3)
  418.         move.l    d1,d0
  419.         bsr    GetGadgetPtr
  420.         sub.l    a2,a2
  421.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  422.         unlk    a5
  423. .End        movem.l    (sp)+,RegsAll
  424.         rts
  425.  
  426.  
  427.  
  428. **********************************************************************
  429. *                  Set MX Gadget to specified value                  *
  430. * D0 = Number of gadget                                              *
  431. * D1 = Number of button to activate                                  *
  432. * A0 = Address of GadgetList                                         *
  433. * A1 = Address of window                                             *
  434. * A2 = Address of tags                                               *
  435. **********************************************************************
  436. SetMXGad    movem.l    RegsAll,-(sp)
  437.         move.l    a1,d2
  438.         beq.s    .End
  439.         and.l    #$000000ff,d0
  440.         bsr    GetGadgetPtr
  441.         link    a5,#-12
  442.         lea    -12(a5),a3
  443.         move.l    #GTMX_Active,(a3)
  444.         move.l    d1,4(a3)
  445.         move.l    #TAG_DONE,8(a3)
  446.         sub.l    a2,a2
  447.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  448.         unlk    a5
  449. .End        movem.l    (sp)+,RegsAll
  450.         rts
  451.  
  452.  
  453.  
  454.  
  455. **********************************************************************
  456. *              Set a cycle gadget to a specified value               *
  457. * D0 = Number of gadget                                              *
  458. * D1 = Number of active item                                         *
  459. * A0 = Address of GadgetList                                         *
  460. * A1 = Pointer to window                                             *
  461. **********************************************************************
  462. SetCycleGad    movem.l    RegsAll,-(sp)
  463.         move.l    a1,d2
  464.         beq.s    .End
  465.         bsr.s    GetGadgetPtr
  466.         link    a5,#-12
  467.         lea    -12(a5),a3
  468.         move.l    #GTCY_Active,(a3)
  469.         move.l    d1,4(a3)
  470.         move.l    #TAG_DONE,8(a3)
  471.         sub.l    a2,a2
  472.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  473.         unlk    a5
  474. .End        movem.l    (sp)+,RegsAll
  475.         rts
  476.  
  477.  
  478.  
  479.  
  480. **********************************************************************
  481. *                Set the contents of a string gadget                 *
  482. * D0 = Number of gadget                                              *
  483. * A0 = Address of GadgetList                                         *
  484. * A1 = Pointer to window                                             *
  485. * A2 = Pointer to string                                             *
  486. **********************************************************************
  487. SetStringGad    movem.l    RegsAll,-(sp)
  488.         move.l    a1,d2
  489.         beq.s    .End
  490.         bsr.s    GetGadgetPtr
  491.         link    a5,#-12
  492.         lea    -12(a5),a3
  493.         move.l    #GTST_String,(a3)
  494.         move.l    a2,4(a3)
  495.         move.l    #TAG_DONE,8(a3)
  496.         sub.l    a2,a2
  497.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  498.         unlk    a5
  499. .End        movem.l    (sp)+,RegsAll
  500.         rts
  501.  
  502.  
  503. **********************************************************************
  504. *                      Get Address of a gadget                       *
  505. * D0 = Number of gadget                                              *
  506. * A0 = Pointer to first gadget                                       *
  507. **********************************************************************
  508. GetGadgetPtr    lsl.l    #2,d0
  509.         move.l    0(a0,d0),a0
  510.         rts
  511.  
  512.  
  513.  
  514. **********************************************************************
  515. *               Set the contents of an integer gadget                *
  516. * D0 = Number of gadget                                              *
  517. * D1 = New value                                                     *
  518. * A0 = Address of GadgetList                                         *
  519. * A1 = Pointer to window                                             *
  520. **********************************************************************
  521. SetIntegerGad    movem.l    RegsAll,-(sp)
  522.         move.l    a1,d3
  523.         beq.s    .End
  524.         bsr    GetGadgetPtr
  525.         link    a5,#-12
  526.         lea    -12(a5),a3
  527.         move.l    #GTIN_Number,(a3)
  528.         move.l    d1,4(a3)
  529.         move.l    #TAG_DONE,8(a3)
  530.         sub.l    a2,a2
  531.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  532.         unlk    a5
  533. .End        movem.l    (sp)+,RegsAll
  534.         rts
  535.  
  536.  
  537.  
  538.  
  539. **********************************************************************
  540. *                        Set a slider gadget                         *
  541. * D0 = GadgetNumber                                                  *
  542. * D1 = New level                                                     *
  543. * A0 = Pointer to GadList                                            *
  544. * A1 = Pointer to window                                             *
  545. **********************************************************************
  546. SetSliderGad    movem.l    RegsAll,-(sp)
  547.         move.l    a1,d5
  548.         beq.s    .End
  549.         bsr    GetGadgetPtr
  550.         link    a5,#-12
  551.         lea    -12(a5),a3
  552.         move.l    #GTSL_Level,(a3)
  553.         move.l    d1,4(a3)
  554.         move.l    #TAG_DONE,8(a3)
  555.         sub.l    a2,a2
  556.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  557.         unlk    a5
  558. .End        movem.l    (sp)+,RegsAll
  559.         rts
  560.  
  561.  
  562.  
  563. **********************************************************************
  564. *                   Set a TextGadget to new values                   *
  565. * D0 = Number of gadget                                              *
  566. * A0 = Pointer to gadget list                                        *
  567. * A1 = Pointer to window                                             *
  568. * A2 = Pointer to text                                               *
  569. **********************************************************************
  570. SetTextGad    movem.l    RegsAll,-(sp)
  571.         move.l    a1,d1
  572.         beq.s    .End
  573.         bsr    GetGadgetPtr
  574.         link    a5,#-12
  575.         lea    -12(a5),a3
  576.         move.l    #GTTX_Text,(a3)
  577.         move.l    a2,4(a3)
  578.         move.l    #TAG_DONE,8(a3)
  579.         sub.l    a2,a2
  580.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  581.         unlk    a5
  582. .End        movem.l    (sp)+,RegsAll
  583.         rts
  584.  
  585.  
  586. **********************************************************************
  587. *                       Set a palette gadget                         *
  588. * D0 = GadgetNumber                                                  *
  589. * D1 = Number of color                                               *
  590. * A0 = Pointer to GadList                                            *
  591. * A1 = Pointer to window                                             *
  592. **********************************************************************
  593. SetPaletteGad    movem.l    RegsAll,-(sp)
  594.         move.l    a1,d5
  595.         beq.s    .End
  596.         bsr    GetGadgetPtr
  597.         link    a5,#-12
  598.         lea    -12(a5),a3
  599.         move.l    #GTPA_Color,(a3)
  600.         move.l    d1,4(a3)
  601.         move.l    #TAG_DONE,8(a3)
  602.         sub.l    a2,a2
  603.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  604.         unlk    a5
  605. .End        movem.l    (sp)+,RegsAll
  606.         rts
  607.  
  608.  
  609. **********************************************************************
  610. *                      Set a ListView gadget                         *
  611. * D0 = GadgetNumber                                                  *
  612. * D1 = Active item                                                   *
  613. * D2 = Top item                                                      *
  614. * A0 = Pointer to GadList                                            *
  615. * A1 = Pointer to window                                             *
  616. **********************************************************************
  617. SetListViewGad    movem.l    RegsAll,-(sp)
  618.         move.l    a1,d5
  619.         beq.s    .End
  620.         bsr    GetGadgetPtr
  621.         link    a5,#-20
  622.         lea    -20(a5),a3
  623.         ext.l    d1
  624.         ext.l    d2
  625.         move.l    #GTLV_Selected,(a3)
  626.         move.l    d1,4(a3)
  627.         move.l    #GTLV_Top,8(a3)
  628.         move.l    d2,12(a3)
  629.         move.l    #TAG_DONE,16(a3)
  630.         sub.l    a2,a2
  631.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  632.         unlk    a5
  633. .End        movem.l    (sp)+,RegsAll
  634.         rts
  635.  
  636.  
  637.  
  638. **********************************************************************
  639. *                      Set a ListView gadget                         *
  640. * D0 = GadgetNumber                                                  *
  641. * A0 = Pointer to GadList                                            *
  642. * A1 = Pointer to window                                             *
  643. * A2 = New list                                                      *
  644. **********************************************************************
  645. SetListViewLst    movem.l    RegsAll,-(sp)
  646.         move.l    a1,d5
  647.         beq.s    .End
  648.         bsr    GetGadgetPtr
  649.         link    a5,#-12
  650.         lea    -12(a5),a3
  651.         move.l    #GTLV_Labels,(a3)
  652.         move.l    a2,4(a3)
  653.         move.l    #TAG_DONE,8(a3)
  654.         sub.l    a2,a2
  655.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  656.         unlk    a5
  657. .End        movem.l    (sp)+,RegsAll
  658.         rts
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665. **********************************************************************
  666. *                        Set a number gadget                         *
  667. * D0 = GadgetNumber                                                  *
  668. * D1 = New number                                                    *
  669. * A0 = Pointer to GadList                                            *
  670. * A1 = Pointer to window                                             *
  671. **********************************************************************
  672. SetNumberGad    movem.l    RegsAll,-(sp)
  673.         move.l    a1,d5
  674.         beq.s    .End
  675.         bsr    GetGadgetPtr
  676.         link    a5,#-12
  677.         lea    -12(a5),a3
  678.         move.l    #GTNM_Number,(a3)
  679.         move.l    d1,4(a3)
  680.         move.l    #TAG_DONE,8(a3)
  681.         sub.l    a2,a2
  682.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  683.         unlk    a5
  684. .End        movem.l    (sp)+,RegsAll
  685.         rts
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692. **********************************************************************
  693. *                           Ghost a gadget                           *
  694. * D0 = Number of gadget                                              *
  695. * D1 = State                                                         *
  696. * A0 = Pointer to gadgetlist                                         *
  697. * A1 = Pointer to window                                             *
  698. **********************************************************************
  699. GhostGadget    movem.l    RegsAll,-(sp)
  700.         move.l    a1,d2
  701.         beq.s    .End
  702.         bsr    GetGadgetPtr
  703.         link    a5,#-12
  704.         lea    -12(a5),a3
  705.         move.l    #GA_Disabled,(a3)
  706.         move.l    d1,4(a3)
  707.         move.l    #TAG_DONE,8(a3)
  708.         sub.l    a2,a2
  709.         LIBLIB    GT_SetGadgetAttrsA,kb_GadBase
  710.         unlk    a5
  711. .End        movem.l    (sp)+,RegsAll
  712.         rts
  713.  
  714.  
  715.  
  716. **********************************************************************
  717. *                      Activate a string gadget                      *
  718. * D0 = Number of gadget                                              *
  719. * A0 = Pointer to GadgetList                                         *
  720. * A1 = Pointer to Window                                             *
  721. **********************************************************************
  722. ActStringGad    movem.l    RegsAll,-(sp)
  723.         move.l    a1,d1
  724.         beq.s    .End
  725.         bsr    GetGadgetPtr
  726.         sub.l    a2,a2
  727.         LIBLIB    ActivateGadget,kb_IntBase
  728.         movem.l    (sp)+,RegsAll
  729. .End        rts
  730.  
  731.  
  732.  
  733.  
  734. **********************************************************************
  735. *              Send a message to the other one and wait              *
  736. * A0 = Pointer to receiver`s port                                    *
  737. * A1 = Pointer to our port                                           *
  738. * D0 = Type of message                                               *
  739. * RET: D0 = ReturnValue                                              *
  740. **********************************************************************
  741. ComPut        movem.l    d1-d7/a2-a6,-(sp)
  742.         move.l    a0,d7
  743.         beq.s    .End
  744.         CALLSYS    Forbid
  745.         link    a5,#-cmsg_SIZEOF
  746.         lea    -cmsg_SIZEOF(a5),a2
  747.         clr.l    LN_SUCC(a2)
  748.         clr.l    LN_PRED(a2)
  749.         move.b    #NT_MESSAGE,LN_TYPE(a2)
  750.         clr.b    LN_PRI(a2)
  751.         clr.l    LN_NAME(a2)
  752.         move.l    a1,MN_REPLYPORT(a2)
  753.         move.w    #cmsg_SIZEOF,MN_LENGTH(a2)
  754.         move.w    d0,cmsg_Type(a2)
  755.         clr.l    cmsg_RetValue(a2)
  756.         move.l    a1,-(sp)
  757.         move.l    a2,a1
  758.         DOLIB    PutMsg
  759.         DOLIB    Permit
  760.         move.l    (sp)+,a2
  761. .Loop        move.l    a2,a0
  762.         DOLIB    WaitPort
  763.         tst.l    d0
  764.         beq.s    .Loop
  765.         move.l    d0,a1
  766.         move.l    cmsg_RetValue(a1),d7
  767.         DOLIB    Remove
  768.         move.l    d7,d0
  769.         unlk    a5
  770. .End        movem.l    (sp)+,d1-d7/a2-a6
  771.         rts
  772.  
  773.  
  774.  
  775. **********************************************************************
  776. *                Edit Hook for String/Integer gadgets                *
  777. * A0 = Pointer to Hook itself                                        *
  778. * A1 = Pointer to parameter                                          *
  779. * A2 = Pointer to SGWork-Structure                                   *
  780. *                       Provided editing is :                        *
  781. * Activating the next gadget on RETURN press                         *
  782. * Actuvating the previous gadget on CONTROL RETURN press             *
  783. * Simulating HELP-Exit of gadget on ESC-Press                        *
  784. * Accessing menus via Key-Stroke RIGHT AMIGA - ShortCut              *
  785. * Using CURSOR UP/DOWN for entering previous/next gadget             *
  786. * Using CONTROL CURSOR LEFT/RIGHT to get to the prev/next word       *
  787. **********************************************************************
  788. StrEditFunc    movem.l    RegsAll,-(sp)
  789.         cmp.l    #SGH_KEY,0(a1)            ; Key pressed ?
  790.         bne    .End
  791.         move.l    sgw_Actions(a2),d0
  792.         move.l    d0,d1
  793.         and.l    #SGA_END,d0            ; Gadget released ?
  794.         beq.s    .NoReturn            ; Nope -> go on
  795.         cmp.w    #HELPKEY,sgw_Code(a2)        ; HELP used to escape ?
  796.         beq.s    .NoReturn            ; Yep -> go on
  797.         move.l    sgw_IEvent(a2),a3
  798.         move.w    ie_Qualifier(a3),d2
  799.         and.w    #(IEQUALIFIER_CONTROL),d2
  800.         beq.s    .NextGadget
  801.         or.l    #SGA_PREVACTIVE,d1        ; On control previous gadget
  802.         bra.s    .ActGadget
  803. .NextGadget    or.l    #SGA_NEXTACTIVE,d1
  804. .ActGadget    move.l    d1,sgw_Actions(a2)
  805.         bra    .End
  806.  
  807. .NoReturn    move.l    sgw_IEvent(a2),a3        ; User pressed ESC ?
  808.         cmp.w    #RESCKEY,ie_Code(a3)
  809.         bne.s    .NoEsc
  810.         move.l    #SGA_END,sgw_Actions(a2)    ; Simulate release of gadget
  811.         move.w    #HELPKEY,sgw_Code(a2)
  812.         bra    .End
  813. .NoEsc        cmp.w    #$4c,ie_Code(a3)        ; Cursor UP ?
  814.         bne.s    .NoUp
  815.         move.l    #SGA_END|SGA_PREVACTIVE,sgw_Actions(a2)
  816.         move.w    #$44,sgw_Code(a2)
  817.         bra    .End
  818. .NoUp        cmp.w    #$4d,ie_Code(a3)        ; Cursor DOWN ?
  819.         bne.s    .NoDown
  820.         move.l    #SGA_END|SGA_NEXTACTIVE,sgw_Actions(a2)
  821.         move.w    #$44,sgw_Code(a2)
  822.         bra    .End
  823. .NoDown        move.w    ie_Qualifier(a3),d0
  824.         and.w    #IEQUALIFIER_CONTROL,d0        ; CONTROL pressed ?
  825.         beq    .NoWordJump
  826.         move.l    sgw_WorkBuffer(a2),a1        ; Get pointer to buffer
  827.         move.w    sgw_BufferPos(a2),d0        ; Get cursor position
  828.         cmp.w    #$4f,ie_Code(a3)        ; Jump to left word ?
  829.         beq.s    .JumpLeft
  830.         cmp.w    #$4e,ie_Code(a3)        ; Jump to right word ?
  831.         beq.s    .JumpRight
  832.         bra    .NoWordJump
  833. .JumpLeft    tst.w    d0                ; Already at beginning ?
  834.         beq    .End
  835.         moveq    #-1,d1                ; Set new position
  836. .LeftLoop1    tst.w    d0                ; All done ?
  837.         blt.s    .FirstLeft            ; Yep -> first loop donw
  838.         cmp.b    #' ',0(a1,d0.w)            ; Got a space ?
  839.         beq.s    .NoCharLeft            ; Yep -> loop
  840.         move.w    d0,d1                ; Nope -> Store new position
  841.         bra.s    .FirstLeft
  842. .NoCharLeft    subq.w    #1,d0                ; Next char to the left
  843.         bra.s    .LeftLoop1
  844. .FirstLeft    cmp.w    #-1,d1                ; Got new position ?
  845.         bne.s    .NoNegLeft
  846.         moveq    #0,d1                ; Nope -> clear position
  847. .NoNegLeft    tst.w    d1                ; New position marked ?
  848.         beq.s    .JumpedLeft            ; Nope -> jump to first char
  849.         move.w    d1,d0                ; Copy new position
  850.         moveq    #-1,d1                ; Clear position
  851. .LeftLoop2    tst.w    d0                ; Already at first char ?
  852.         blt.s    .JumpedLeft            ; Yep -> position cursor
  853.         cmp.b    #' ',0(a1,d0.w)            ; Now skip chars different to space
  854.         bne.s    .NoSpaceLeft
  855.         move.w    d0,d1                ; Store first pos of char after space
  856.         addq.w    #1,d1
  857.         bra.s    .JumpedLeft            ; DONE
  858. .NoSpaceLeft    subq.w    #1,d0                ; Loop for chars
  859.         bra    .LeftLoop2
  860. .JumpedLeft    tst.w    d1                ; Do we have a new position ?
  861.         bge.s    .GotLeft            ; Yep -> Repos
  862.         clr.w    sgw_BufferPos(a2)        ; Set cursor to first char
  863.         bra.s    .LeftDone
  864. .GotLeft    move.w    d1,sgw_BufferPos(a2)        ; Set cursor to new position
  865. .LeftDone    move.w    #EO_MOVECURSOR,sgw_EditOp(a2)
  866.         bra    .End
  867.  
  868. .JumpRight    cmp.w    sgw_NumChars(a2),d0        ; Already at end of string ?
  869.         beq    .End                ; Yep -> no movement
  870.         moveq    #-1,d1
  871. .RightLoop    cmp.w    sgw_NumChars(a2),d0        ; All chars checked ?
  872.         beq.s    .JumpedRight            ; Yep -> end of movement
  873.         cmp.b    #' ',0(a1,d0.w)            ; Space encountered ?
  874.         bne.s    .NoSpaceRight            ; Nope -> go on
  875. .RightSpaceLoop    cmp.w    sgw_NumChars(a2),d0        ; All chars checked ?
  876.         beq.s    .JumpedRight            ; Yep -> end of movement
  877.         cmp.b    #' ',0(a1,d0.w)            ; Still a space ?
  878.         beq.s    .NoRightChar            ; Yep -> loop for spaces
  879.         move.w    d0,d1                ; Got new word
  880.         bra.s    .JumpedRight            ; -> Do movement
  881. .NoRightChar    addq.w    #1,d0                ; Next char (SPACE)
  882.         bra    .RightSpaceLoop            ; Loop for spaces
  883. .NoSpaceRight    addq.w    #1,d0                ; Loop for normal chars
  884.         bra    .RightLoop
  885. .JumpedRight    tst.w    d1                ; Got new position ?
  886.         bge.s    .GotRight            ; Yep -> do so
  887.         move.w    sgw_NumChars(a2),sgw_BufferPos(a2)
  888.         bra.s    .RightDone
  889. .GotRight    move.w    d1,sgw_BufferPos(a2)        ; Store new position
  890. .RightDone    move.w    #EO_MOVECURSOR,sgw_EditOp(a2)
  891.         bra.s    .End
  892.  
  893. .NoWordJump    move.l    sgw_IEvent(a2),a3
  894.         move.w    ie_Qualifier(a3),d0        ; Right Amiga pressed ?
  895.         and.w    #IEQUALIFIER_RCOMMAND,d0
  896.         beq.s    .NoAmiga
  897.         cmp.w    #96,ie_Code(a3)            ; Char entered ?
  898.         bge.s    .NoAmiga
  899.         move.w    ie_Qualifier(a3),d0        ; Any shift pressed ?
  900.         and.w    #(IEQUALIFIER_LSHIFT|IEQUALIFIER_RSHIFT),d0
  901.         bne.s    .DoMenu
  902.         cmp.w    #$32,ie_Code(a3)        ; Magic X
  903.         beq.s    .NoAmiga
  904.         cmp.w    #$10,ie_Code(a3)        ; or Q pressed ?
  905.         beq.s    .NoAmiga
  906. .DoMenu        move.l    sgw_Actions(a2),d0        ; Ok -> Then use the menues
  907.         or.l    #(SGA_END|SGA_REUSE),d0
  908.         and.l    #~(SGA_USE|SGA_BEEP),d0
  909.         move.l    d0,sgw_Actions(a2)
  910.         move.l    sgw_GadgetInfo(a2),a0
  911.         bra.s    .End
  912. .NoAmiga
  913. .End        movem.l    (sp)+,RegsAll
  914.         rts
  915.  
  916.  
  917.  
  918.  
  919. **********************************************************************
  920. *                    Find underneith mousepointer                    *
  921. **********************************************************************
  922. FindWindow    movem.l    d2-d7/a2-a6,-(sp)
  923.         moveq    #0,d0                ; Lock Intuition-Base
  924.         LIBLIB    LockIBase,kb_IntBase
  925.         move.l    kb_IntBase(a6),a0
  926.         move.l    ib_FirstScreen(a0),a3
  927.         move.l    d0,a0
  928.         LIBLIB    UnlockIBase,kb_IntBase
  929.  
  930.         LIBLIB    Forbid,kb_SysBase
  931.  
  932.         move.l    a3,a0
  933.  
  934. .CheckScreens    moveq    #0,d0
  935.         moveq    #0,d1
  936.         move.w    sc_MouseX(a0),d0
  937.         move.w    sc_MouseY(a0),d1
  938.  
  939.         movem.l    a0/d1,-(sp)            ; Check layer
  940.         lea    sc_LayerInfo(a0),a0
  941.         LIBLIB    WhichLayer,kb_LayersBase
  942.         movem.l    (sp)+,a0/d1
  943.         tst.l    d0
  944.         bne.s    GotLayer
  945.  
  946.         move.l    sc_NextScreen(a0),a0        ; Next Screen
  947.         move.l    a0,d3                ; No more screens ?
  948.         beq.s    ScreenError            ; Error
  949.         bra.s    .CheckScreens            ; Find screen
  950.  
  951. ScreenError    moveq    #0,d0
  952. GotLayer    LIBLIB    Permit,kb_SysBase
  953.         movem.l    (sp)+,d2-d7/a2-a6
  954.         rts
  955.  
  956.  
  957.  
  958.  
  959. **********************************************************************
  960. *                        Free list of windows                        *
  961. **********************************************************************
  962. FreeWindows    movem.l    a2/a6,-(sp)
  963.         move.l    a0,a2
  964.         move.l    a2,-(sp)
  965.         TSTLIST    a2
  966.         beq.s    .Done
  967.         move.l    LH_HEAD(a2),a2
  968. .FreeEntries    move.l    a2,a1
  969.         SUCC    a2,a2
  970.         CALLSYS    FreeVec
  971.         tst.l    (a2)
  972.         beq.s    .Done
  973.         bra.s    .FreeEntries
  974. .Done        move.l    (sp)+,a0
  975.         NEWLIST    a0
  976.         movem.l    (sp)+,a2/a6
  977.         rts
  978.  
  979.  
  980.  
  981.  
  982. **********************************************************************
  983. *                          Display an error                          *
  984. **********************************************************************
  985. DisplayError    movem.l    d1-d7/a0-a6,-(sp)
  986.  
  987.         cmp.l    #500,d0                ; Printer Error ?
  988.         blt.s    .NoPrintError
  989.         sub.l    #500,d0
  990.         lea    PrinterErrors(pc),a0
  991.         lsl.l    #2,d0
  992.         move.l    0(a0,d0),a0
  993.         bra.s    .DosError
  994.  
  995. .NoPrintError    cmp.l    #400,d0                ; IFF Error ?
  996.         blt.s    .NoIFFError
  997.         sub.l    #400,d0
  998.         lea    IFFErrors,a0
  999.         lsl.l    #2,d0
  1000.         move.l    0(a0,d0),a0
  1001.         bra.s    .DosError
  1002.  
  1003. .NoIFFError    cmp.l    #200,d0                ; Display DOS error ?
  1004.         blt.s    .OurError            ; Nope -> go on
  1005.         move.l    d0,d1
  1006.         opt    ow6-
  1007.         LOCLEA    DosError(pc),a0
  1008.         opt    ow6+
  1009.         move.l    a0,d2
  1010.         lea    DosErrorBuff(pc),a0
  1011.         move.l    a0,d3
  1012.         move.l    #128,d4
  1013.         LIBLIB    Fault,kb_DosBase
  1014.         lea    DosErrorBuff(pc),a0
  1015.         bra.s    .DosError
  1016.  
  1017. .OurError    lea    EasyTexts(pc),a0
  1018.         lsl.l    #2,d0
  1019.         move.l    0(a0,d0),a0            ; get adr of error-txt
  1020. .DosError    move.l    a0,d0
  1021.         beq.s    .End
  1022.         lea    MyEasyRequest(pc),a1        ; Display Easy-Requester
  1023.         move.l    #EasyTitle,es_Title(a1)
  1024.         move.l    a0,-(sp)
  1025.         bsr.s    GetLocStr
  1026.         move.l    (sp)+,es_TextFormat(a1)
  1027.         move.l    #EasyGadget,es_GadgetFormat(a1)
  1028.         sub.l    a0,a0
  1029.         sub.l    a2,a2
  1030.         LIBLIB    EasyRequestArgs,kb_IntBase
  1031. .End        movem.l    (sp)+,d1-d7/a0-a6
  1032.         rts
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038. **********************************************************************
  1039. *                     Get a string froma locale                      *
  1040. **********************************************************************
  1041. GetLocStr    movem.l    d0-d1/a0-a1/a6,-(sp)
  1042.         move.l    kb_Catalog(a6),d1
  1043.         beq.s    .End
  1044.         move.l    24(sp),d0
  1045.         beq.s    .End
  1046.         move.l    d0,a1
  1047.         moveq    #0,d0
  1048.         move.l    a1,d1
  1049.         lea    LOCALE_END(pc),a0
  1050.         cmp.l    a0,d1
  1051.         bgt.s    .End
  1052.         lea    LOCALE_START(pc),a0
  1053.         cmp.l    a0,d1
  1054.         blt.s    .End
  1055.         sub.l    a0,d1
  1056.         beq.s    .GetIt
  1057.  
  1058. .Loop        tst.b    (a0)+
  1059.         bne.s    .Ok
  1060.         addq.l    #1,d0
  1061. .Ok        subq.l    #1,d1
  1062.         bne.s    .Loop
  1063.  
  1064. .GetIt        move.l    kb_Catalog(a6),a0
  1065.         LIBLIB    GetCatalogStr,kb_LocaleBase
  1066.         move.l    d0,24(sp)
  1067. .End        movem.l    (sp)+,d0-d1/a0-a1/a6
  1068.         rts
  1069.  
  1070.  
  1071.  
  1072.  
  1073.  
  1074. **********************************************************************
  1075. *                       Easy-Requeststructure                        *
  1076. **********************************************************************
  1077. MyEasyRequest    dc.l    es_SIZEOF
  1078.         dc.l    0
  1079.         dc.l    0
  1080.         dc.l    0
  1081.         dc.l    0
  1082. EasyGadget    dc.b    "OK",0
  1083.         EVEN
  1084.  
  1085.  
  1086.  
  1087. **********************************************************************
  1088. *                            Error-Texts                             *
  1089. **********************************************************************
  1090. EasyTitle    dc.b    "KCommodity V"
  1091.         REVISION
  1092. EasyTitleEnd    dc.b    0
  1093.         EVEN
  1094. EasyTexts    dc.l    EZTxt1,EZTxt2,EZTxt3,EZTxt4,EZTxt5,EZTxt6,EZTxt7,EZTxt8
  1095.         dc.l    EZTxt9,EZTxt10,EZTxt11,EZTxt12,EZTxt13,EZTxt14,EZTxt15,EZTxt16
  1096.         dc.l    EZTxt17,EZTxt18,EZTxt19,EZTxt20,EZTxt21,EZTxt22,EZTxt23,EZTxt24
  1097.         dc.l    EZTxt25,EZTxt26,EZTxt27,EZTxt28,EZTxt29,EZTxt30
  1098. **********************************************************************
  1099. *                      Error texts for IFFParse                      *
  1100. **********************************************************************
  1101. IFFErrors    dc.l    0,0,0,IFFTxt3,IFFTxt4,IFFTxt5,IFFTxt6,IFFTxt7,IFFTxt8,IFFTxt9
  1102.         dc.l    IFFTxt10
  1103. **********************************************************************
  1104. *                      Error texts for printer                       *
  1105. **********************************************************************
  1106. PrinterErrors    dc.l    0,PrtTxt2,PrtTxt3,0,PrtTxt5,0,PrtTxt7,PrtTxt8
  1107.  
  1108.  
  1109. **********************************************************************
  1110. *                       Texts to be localized                        *
  1111. **********************************************************************
  1112. LOCALE_START
  1113. * CATALOG kcxlib
  1114. * VERSION 2.5
  1115. * DATE 01.02.93
  1116. EZTxt1        dc.b    "%s could not be opened.",0
  1117. * D            "%s konnte nicht geoeffnet werden.",0
  1118. EZTxt2        dc.b    "Broker-Port could not be created.",0
  1119. * D            "Broker-Port konnte nicht erstellt werden.",0
  1120. EZTxt3        dc.b    "Broker could not be set up.",0
  1121. * D            "Broker konnte nicht gestartet werden-",0
  1122. EZTxt4        dc.b    "Broker could not be set up correctly.",0
  1123. * D            "Broker konnte nicht richtig installiert werden.",0
  1124. EZTxt5        dc.b    "Could not generate BitMap.",0
  1125. * D            "Konnte BitMap nicht erzeugen.",0
  1126. EZTxt6        dc.b    "Could not generate RastPort.",0
  1127. * D            "Konnte RastPort nicht erzeugen.",0
  1128. EZTxt7        dc.b    "Could not allocate memory for BitPlanes.",0
  1129. * D            "Konnte Speicher für BitMaps nicht allokieren.",0
  1130. EZTxt8        dc.b    "Could not set appropriate font.",0
  1131. * D            "Konnte richtigen Zeichensatz nicht setzen.",0
  1132. EZTxt9        dc.b    "Could not allocate memory for ARexx-Buffer.",0
  1133. * D            "Konnte Speicher für ARexx-Puffer nicht allokieren.",0
  1134. EZTxt10        dc.b    "Could not allocate memory for Audio-Request.",0
  1135. * D            "Konnte Speicher für Audio-Request nicht allokieren.",0
  1136. EZTxt11        dc.b    "Could not allocate memory for Console-Request.",0
  1137. * D            "Konnte Speicher für Console-Request nicht allokieren.",0
  1138. EZTxt12        dc.b    "Could not set up ARexx-Port.",0
  1139. * D            "Konnte ARexx-Port nicht öffnen.",0
  1140. EZTxt13        dc.b    "Out of memory.",0
  1141. * D            "Fehlender Speicher.",0
  1142. EZTxt14        dc.b    "Audio-Port could not be set up.",0
  1143. * D            "Audio-Port konnte nicht initialisiert werden.",0
  1144. EZTxt15        dc.b    "Default HotKey",$0a,$0a
  1145.         dc.b    "%s",$0a,$0a
  1146.         dc.b    "could not be set up. Aborting",0
  1147. * D            "Voreingestellter HotKey",10,10
  1148. * D            "%s",10,10
  1149. * D            "konnte nicht initialisiert werden. Abbruch",0
  1150. EZTxt16        dc.b    "The AppIcon could not be installed.",0
  1151. * D            "Das AppIcon konnte nicht installiert werden.",0
  1152. EZTxt17        dc.b    "The AppMenu could not be installed.",0
  1153. * D            "Das AppMenu konnte nicht installiert werden.",0
  1154. EZTxt18        dc.b    "The Preferences-File you attempted to",$0a
  1155.         dc.b    "    load was not generated with",$0a
  1156.         dc.b    "          KCommodity V%s",10
  1157.         dc.b    "    Unable to load preferences.",0
  1158. * D            "Sie haben versucht eine Einstellungsdatei",10
  1159. * D            "        zu laden, die nicht mit",10
  1160. * D            "             KCommodity V%s",10
  1161. * D            "erzeugt wurde. Kann die Daten nicht lesen.",0
  1162. EZTxt19        dc.b    "Memory for InputRequest could not be allocated.",0
  1163. * D            "Speicher für InputRequest konnte nicht allokiert werden.",0
  1164. EZTxt20        dc.b    "MessagePort for InputRequest could not be created.",0
  1165. * D            "MessagePort für InputRequest konnte nicht erzeugt werden.",0
  1166. EZTxt21        dc.b    "InputHandler could not be installed.",0
  1167. * D            "InputHandler konnte nicht installiert werden.",0
  1168. EZTxt22        dc.b    "Could not allocate IFF-Handle for access to file.",0
  1169. * D            "Konnte IFF-Handle nicht allokieren,",10
  1170. * D            "um Zugriff auf die Datei zu bekommen.",0
  1171. EZTxt23        dc.b    "User HotKey",$0a,$0a
  1172.         dc.b    "%s",$0a,$0a
  1173.         dc.b    "could not be installed.",$0a,$0a
  1174.         dc.b    "Now using default : %s",0
  1175. * D            "Benutzer HotKey",10,10
  1176. * D            "%s",10,10
  1177. * D            "konnte nicht installiert werden",0
  1178. EZTxt24        dc.b    "Please check your inputs.",0
  1179. * D            "Überprüfen Sie Ihre Eingaben.",0
  1180. EZTxt25        dc.b    "Can`t dump.",$0a
  1181.         dc.b    "Needed resources for printer.device",$0a
  1182.         dc.b    "could not be allocated.",0
  1183. * D            "Kann nicht drucken.",10
  1184. * D            "Geforderte Resourcen für das printer.device",10
  1185. * D            "konnten nicht allokiert werden.",0
  1186. EZTxt26        dc.b    "This window can not be identified",$0a
  1187.         dc.b    "by it`s title. I can`t handle something like that.",0
  1188. * D            "Dieses Fenster kann nicht anhand seiner Titelleiste",10
  1189. * D            "erkannt werden. So etwas kann ich nicht handhaben.",0
  1190. EZTxt27        dc.b    "Could not allocate User Task-Signal.",0
  1191. * D            "Konnte Benutzer Task-Signal nicht allokieren.",0
  1192. EZTxt28        dc.b    "Shared IDCMP-Port for windows could",$0a
  1193.         dc.b    "not be allocated.",0
  1194. * D            "Geteilter IDCMP-Port für Fenster konnte",10
  1195. * D            "nicht allokiert werden.",0
  1196. EZTxt29        dc.b    "Could not allocate Port for trackdisk.device.",0
  1197. * D            "Port für trackdisk.device konnte nicht allokiert werden.",0
  1198. EZTxt30        dc.b    "Can not quit yet.",10
  1199.         dc.b    "Print-Process still running.",0
  1200. * D            "Kann jetzt noch nicht beenden.",10
  1201. * D            "Druck-Prozess läuft noch.",0
  1202. IFFTxt3        dc.b    "Did not get a valid scope for property on IFF file.",0
  1203. * D            "Konnte keinen Zugriff auf die Daten der IFF-Datei bekommen",0
  1204. IFFTxt4        dc.b    "Memory allocation failed while",$0a
  1205.         dc.b    "loading IFF file.",0
  1206. * D            "Speicher-Allokierung, während des Ladens der",10
  1207. * D            "IFF-Datei, fehlgeschlagen.",0
  1208. IFFTxt5        dc.b    "Read error occured during examination",$0a
  1209.         dc.b    "of IFF file.",0
  1210. * D            "Lesefehler aufgetreten, während der",10
  1211. * D            "Untersuchung der IFF-Datei.",0
  1212. IFFTxt6        dc.b    "Write error while writing to IFF file.",0
  1213. * D            "Schreibfehler beim Schreiben in die IFF Datei",0
  1214. IFFTxt7        dc.b    "Seek error within IFF file.",0
  1215. * D            "Suchfehler innerhalb der IFF Datei.",0
  1216. IFFTxt8        dc.b    "Data corrupt within IFF file.",0
  1217. * D            "Daten zerstört innerhalb der IFF Datei.",0
  1218. IFFTxt9        dc.b    "IFF syntax in bad condition, could",$0a
  1219.         dc.b    "not load IFF file correctly.",0
  1220. * D            "IFF Syntax innerhalb der Datei in schlechtem Zustand.",10
  1221. * D            "Konnte die Daten nicht richtig laden.",0
  1222. IFFTxt10    dc.b    "The file %s ",$0a
  1223.         dc.b    "you attempted to load is not",$0a
  1224.         dc.b    "an IFF file.",0
  1225. * D            "Die Datei %s,",10
  1226. * D            "die Sie laden wollten, ist keine IFF Datei.",0
  1227. PrtTxt2        dc.b    "Dump canceled on user request.",0
  1228. * D            "Ausdruck, auf Wunsch des Benutzers, abgebrochen.",0
  1229. PrtTxt3        dc.b    "Selected printer",$0a
  1230.         dc.b    "%s",$0a
  1231.         dc.b    "does not support Graphics dumps.",0
  1232. * D            "Gewählter Drucker",10
  1233. * D            "%s",10
  1234. * D            "unterstützt leider keinen Graphikdruck.",0
  1235. PrtTxt5        dc.b    "Bad dimensions specified for printout.",0
  1236. * D            "Schlechte Dimensionen für den Ausdruck angegeben.",0
  1237. PrtTxt7        dc.b    "printer.device could not allocate",$0a
  1238.         dc.b    "internal variables.",0
  1239. * D            "printer.device konnte interne",10
  1240. * D            "Variablen nicht allokieren.",0
  1241. PrtTxt8        dc.b    "printer.device could not allocate",$0a
  1242.         dc.b    "internal buffers",0
  1243. * D            "printer.device konnte interne",10
  1244. * D            "Puffer nicht allokieren.",0
  1245. DosError    dc.b    "DOS-Error ",0
  1246. * D            "DOS-Fehler ",0
  1247. LOCALE_END
  1248.         EVEN
  1249.  
  1250.  
  1251. **********************************************************************
  1252. *                   Special define for Dos-Errors                    *
  1253. **********************************************************************
  1254. DosErrorBuff    ds.b    128
  1255.         EVEN
  1256.  
  1257.  
  1258.  
  1259.  
  1260. **********************************************************************
  1261. *  Text attribute for gadgets. We are stubborn. Let`s take topaz :-) *
  1262. **********************************************************************
  1263. GadgetTxtAttr    dc.l    0
  1264.         dc.w    8
  1265.         dc.b    FS_NORMAL
  1266.         dc.b    FPF_ROMFONT
  1267. TopazTxtAttr    dc.l    FontName
  1268.         dc.w    8
  1269.         dc.b    FS_NORMAL
  1270.         dc.b    FPF_ROMFONT
  1271. FontName    dc.b    "topaz.font",0
  1272.         EVEN
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.         SECTION    Library,DATA_C
  1280.  
  1281. **********************************************************************
  1282. *                         Busy pointer image                         *
  1283. **********************************************************************
  1284. BusyPtr        DC.W    $0000,$0000,$0400,$07C0,$0000,$07C0
  1285.         DC.W    $0100,$0380,$0000,$07E0,$07C0,$1FF8
  1286.         DC.W    $1FF0,$3FEC,$3FF8,$7FDE,$3FF8,$7FBE
  1287.         DC.W    $7FFC,$FF7F,$7EFC,$FFFF,$7FFC,$FFFF
  1288.         DC.W    $3FF8,$7FFE,$3FF8,$7FFE,$1FF0,$3FFC
  1289.         DC.W    $07C0,$1FF8,$0000,$07E0,$0000,$0000
  1290.  
  1291.  
  1292. EndOfLibrary
  1293.         END